Skip to content

fix: Limit rocksdb fd allocation#2990

Draft
jfldde wants to merge 3 commits intonightlyfrom
fix/rocksdb-open-files
Draft

fix: Limit rocksdb fd allocation#2990
jfldde wants to merge 3 commits intonightlyfrom
fix/rocksdb-open-files

Conversation

@jfldde
Copy link
Contributor

@jfldde jfldde commented Oct 21, 2025

Description

  • Prevent crashing on macos with Too many open files while running ulimit default settings.
  • Allocates only half of available fds to rocksdb.

@jfldde jfldde requested a review from eyusufatik as a code owner October 21, 2025 09:27
@auto-assign auto-assign bot requested a review from kpp October 21, 2025 09:27
@jfldde jfldde marked this pull request as draft October 21, 2025 10:38
@jfldde jfldde marked this pull request as ready for review October 28, 2025 11:11
Copy link
Contributor

@rakanalh rakanalh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How were the usage percentages decided?

@codecov
Copy link

codecov bot commented Oct 28, 2025

Codecov Report

❌ Patch coverage is 88.88889% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.6%. Comparing base (ade47ae) to head (c2eabe4).

Files with missing lines Patch % Lines
...ign-sdk/full-node/db/sov-db/src/rocks_db_config.rs 80.0% 2 Missing ⚠️
Additional details and impacted files
Files with missing lines Coverage Δ
...reign-sdk/full-node/db/sov-db/src/ledger_db/mod.rs 82.0% <ø> (ø)
...sovereign-sdk/full-node/db/sov-db/src/native_db.rs 98.7% <100.0%> (+<0.1%) ⬆️
.../sovereign-sdk/full-node/db/sov-db/src/state_db.rs 91.3% <100.0%> (+0.1%) ⬆️
...ign-sdk/full-node/db/sov-db/src/rocks_db_config.rs 96.4% <80.0%> (+5.2%) ⬆️

... and 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jfldde
Copy link
Contributor Author

jfldde commented Oct 28, 2025

How were the usage percentages decided?

Rough estimation from known usage between state/ledger/native dbs.
This PR is a safeguard when running without config set and default ulimit which is very low on macos. Prevents crashing in this case but it is adviced against running without higher ulimit and/or config

Doesn't make much sense looking at my local node, I'll come back to this

@jfldde jfldde marked this pull request as draft October 28, 2025 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants